def greatestCommonDivisorNum(a, b):
  """ if  a > b :
    while b > 0:
      if a % b == 0:
        return b
        break
      b -= 1
  else:
    while a > 0:
      if b % a == 0:
        return a
        break
      a-= 1 """


  temp = a % b
  while temp != 0:
    a = b 
    b= temp
    temp = a % b
  return b
      